CygNet Studio > Using TheFrame/TheView > Using Layers

Using Layers

A screen can be comprised of one or more layers. Layers are helpful for organizing objects on a screen into logical divisions. For example, a layer called "Pipes" can be created on which pipe graphics are placed. On top of that, you could create a layer called “Controls,” which might contain text boxes and buttons. Layers can be locked to avoid accidental changes, or made invisible altogether. By default, a screen has a single layer named “Default.”  For simple screens, you might choose to put all objects on this layer and not perform any additional layer management.

The Default layer is always the bottom layer. Other layers are stacked based on in the order they are listed in the Layers Sheet; however, the order does not affect the stacking of individual objects. Objects are stacked based on the order they are added to TheView (see Adding Objects to TheView.)

A layer can be “locked.” This means that no new objects can be added to the layer, nor can the properties of any object on the layer be altered.

A layer can also be hidden. This means that none of the objects on the layer are visible in Run mode. You must use script to dynamically hide or show a layer in Run mode. See Scripting in CygNet Studio for an example of script to hide or show a layer using script.

Insertion Layer

The Insertion Layer is the layer to which objects are added. That is, it is the currently selected layer. You can change the insertion layer by selecting the layer name in the Layers Sheet box (Layers option on the Layout menu) or by selecting the layer name in the Layer drop-down menu on the Format bar.

Assigning Objects to Layers

When an object is added to TheView, it is added to the Insertion Layer. You can change the layer assignment by clicking the object’s Layer property.

Adding, Deleting, and Managing Layers

The Layers Sheet is the interface for adding, deleting, and managing layers.

Open the Layers Sheet box by doing one of the following:

To Add a Layer

  1. Click the New button in the Layers Sheet dialog box.
  2. In the Name text box, type a name for the layer.
  3. Use the Up and Down buttons to order the layer in the desired position in the list.

To Delete a Layer

  1. Click the layer name in the Layers Sheet dialog box.
  2. Click Delete. When you delete a layer that has objects assigned to it, the objects will be reassigned to the layer below it. To reassign the objects to a different layer you must first rearrange the layers.

To Lock/Unlock a Layer

  1. Click the layer name in the Layers Sheet dialog box.
  2. Click to select/clear the Lock check box to lock/unlock the layer. When a layer is locked, no new items can be added to the layer nor can the properties of any object on the layer be modified.

To View/Hide a Layer

  1. Click on the layer name in the Layers Sheet dialog box.
  2. Click to select/clear the View check box to view/hide the layer. When a layer is hidden it is not visible in Run mode.
Back to top

Let us know how we can improve this topic.

CygNet at weatherford.com

© 2020 Weatherford. All rights reserved.